home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
recent13.lha
/
Install_RECENT.rexx
next >
Wrap
OS/2 REXX Batch file
|
1995-12-15
|
3KB
|
91 lines
/*
$VER: RECENT_Install v1.1 (15 Dec 95)
*/
options results
program = 'RECENT'
pig_lib = 'apig.library'
pig_ver = '3.3'
cls = '0C0A'x
bell = '07'x
nl = '0A'x
call open(Shell,'con:0/11/640/60/ 'program'_Install v1.1 - DFD Ltd.')
if ~show('L','rexxsupport.library') then do
if addlib('rexxsupport.library',0,-30,0) then nop
else do
call writeln Shell,cls||center('LIBS:rexxsupport.library is not available.',76)
exit 10
end
end
if exists('LIBS:'pig_lib) then do
shell command('version >ram:ver LIBS:'pig_lib)
call open(x,'ram:ver','R')
old_ver = word(readln(x),2)
call close x
call delete('ram:ver')
if old_ver < pig_ver then do
call writeln Shell,cls||center('Updating LIBS:'pig_lib' v.'old_ver' to v.'pig_ver,76)
shell command('copy >nil: libs/'pig_lib' LIBS: clone')
end
end
if ~exists('LIBS:'pig_lib) then do
call writeln Shell,cls||center('Copying libs/'pig_lib' v.'pig_ver' to LIBS:',76)
shell command('copy >nil: libs/'pig_lib' LIBS: clone')
end
if ~show('L','apig.library') then do
if addlib('apig.library',0,-30,0) then nop
else do
call writeln Shell,cls||center('LIBS:apig.library is not available.',76)
exit 10
end
end
call SET_APIG_GLOBALS()
freq = ALLOCFILEREQUEST()
call writeln Shell,cls||center('Where do you want to install 'program'?',76)
install_path = REQUESTFILE(freq,0,0,'Where to install 'program,null(),null(),1,1,null(),0,22,320,177,null())
call FREEFILEREQUEST(freq)
if install_path = null() then signal Die
call writeln Shell,cls||center('Installing 'program,76)
shell command('copy >nil: 'program' 'install_path' clone')
call writeln Shell,cls||center('Installing Run_Script & Icon',76)
shell command('copy >nil: Run_'program'#? 'install_path' clone')
call makedir('ENV:DFD')
call makedir('ENVARC:DFD')
if exists('ENV:'program'.prefs') then do
call writeln(Shell,cls||center('Moving your ENV:'program'.prefs to ENV:DFD/',76))
shell command('copy >nil: ENV:'program'.prefs ENV:DFD clone')
call writech(Shell,nl' Delete ENV:'program'.prefs (y/N) ? ')
response = readch(Shell,1)
if upper(response) = 'Y' then call delete('ENV:'program'.prefs')
if exists('ENVARC:'program'.prefs') then do
call writeln(Shell,cls||center('Moving your ENVARC:'program'.prefs to ENVARC:DFD/',76)
shell command('copy >nil: ENVARC:'program'.prefs ENVARC:DFD clone')
call writech(Shell,nl' Delete ENVARC:'program'.prefs (y/N) ? ')
response = readch(Shell,1)
if upper(response) = 'Y' then call delete('ENVARC:'program'.prefs')
end
end
call writeln(Shell,cls||center('- Install to "'install_path'" Complete -',76))
say program' was installed in >> 'install_path
call Ret
Die:
call close Shell
exit
Ret:
call writech(Shell,nl' Press Return ')
call readch(Shell,1)
return